package com.geralt.im.gui;

import java.awt.Graphics;

import javax.swing.ImageIcon;
import javax.swing.JPanel;

class ImagePanel extends JPanel {
	private String imgPath;
	
	public ImagePanel(String path){
		imgPath = path;
	}
	public void paint(Graphics g) {

		super.paint(g);

		// ImageIcon icon = new ImageIcon("D:\\1.jpg");
		if (imgPath!=null) {
			ImageIcon icon = new ImageIcon(imgPath);

			g.drawImage(icon.getImage(), 0, 0, 400, 300, this);
			
		}
		
	}

}